package com.hm.market.service;

import com.hm.market.dao.AdminMapper;
import com.hm.market.domain.Admin;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author HM
 * @create 2018/2/27 17:42
 * @desc
 **/
@Service
public class AdminService {

    @Autowired
    AdminMapper adminMapper;

    /**
     * @author  HM
     * @create  2018/2/27 17:45
     * @params 
     * @return Boolean
     * @desc 用于验证管理员账号密码是否正确
     **/
    public boolean selectAdminByUsernameAndPwd(String username,String password){
        boolean results = false;
        Admin admin = adminMapper.selectAdminByUsernameAndPwd(username,password);
        if(admin!=null){
            results = true;
        }
        return results;
    }
}
